#coding:utf-8
class Foo(object):
    def __enter__(self):
        pass
    def __exit__(self, exc_type, exc_val, exc_tb):
        pass

with Foo() as foo:
    print('enter foo')